package com.tjetc._1enum;

public class _4EnumExercise {
    public static void main(String[] args) {
        /*
            声明 Week 枚举类 ， 其中包含星期一至星期日的定义；
                MONDAY, TUESDAY, WEDNESDAY, THURSDAY, FRIDAY, SATURDAY, SUNDAY;
            使用 values  返回所有的枚举数组,  并遍历 。
3
         */
        Week[] weeks = Week.values();
        for (int i = 0; i < weeks.length; i++) {
            System.out.println(weeks[i]);
        }
    }
}


enum Week {
    MONDAY,
    TUESDAY,
    WEDNESDAY,
    THURSDAY,
    FRIDAY,
    SATURDAY,
    SUNDAY;
}


